.class public Lrexsee/core/application/Resource;
.super Ljava/lang/Object;
.source "Resource.java"


# static fields
.field private static final DEFAULT_PREFIX:Ljava/lang/String; = "rexsee"

.field private static final DRAWABLE_COVER:Ljava/lang/String; = "cover"

.field private static final STRINGARRAY_DOMAIN_WHITE_LIST:Ljava/lang/String; = "allow_domains"

.field private static final STRING_AUTHOR:Ljava/lang/String; = "app_author"

.field private static final STRING_BROWSERBACKGROUNDCOLOR:Ljava/lang/String; = "browserBackgroundColor"

.field private static final STRING_BROWSERPROGRESSDIALOG:Ljava/lang/String; = "browserProgressDialog"

.field private static final STRING_EMAIL:Ljava/lang/String; = "app_email"

.field private static final STRING_FULLSCREEN:Ljava/lang/String; = "fullScreen"

.field private static final STRING_HOME:Ljava/lang/String; = "app_home"

.field private static final STRING_PREFIX:Ljava/lang/String; = "app_prefix"

.field private static final STRING_PROGRESSCOVER:Ljava/lang/String; = "progressCover"

.field private static final STRING_SCREENORIENTATION:Ljava/lang/String; = "screenOrientation"

.field private static final STRING_STATUSBAR:Ljava/lang/String; = "statusBar"

.field private static final STRING_TITLEBAR:Ljava/lang/String; = "titleBar"


# instance fields
.field public final author:Ljava/lang/String;

.field public final browserBackgroundColor:Ljava/lang/String;

.field public final browserProgressDialog:Z

.field public final cover:Landroid/graphics/drawable/Drawable;

.field public final domainWhiteList:[Ljava/lang/String;

.field public final email:Ljava/lang/String;

.field public final fullScreen:Z

.field public final home:Ljava/lang/String;

.field public final prefix:Ljava/lang/String;

.field public final progressCover:Z

.field public final screenOrientation:Ljava/lang/String;

.field public final statusBar:Z

.field public final titleBar:Z


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 10
    .param p1, "context"    # Landroid/content/Context;

    .prologue
    const/4 v7, 0x0

    const/4 v6, 0x1

    const-string v9, ""

    const-string v8, "false"

    const-string v5, "string"

    .line 43
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 45
    invoke-virtual {p1}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v1

    .line 46
    .local v1, "packageName":Ljava/lang/String;
    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    .line 50
    .local v2, "r":Landroid/content/res/Resources;
    const-string v3, "app_prefix"

    const-string v4, "string"

    invoke-virtual {v2, v3, v5, v1}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

    move-result v0

    .line 51
    .local v0, "id":I
    if-nez v0, :cond_0

    const-string v3, "rexsee"

    :goto_0
    iput-object v3, p0, Lrexsee/core/application/Resource;->prefix:Ljava/lang/String;

    .line 53
    const-string v3, "app_home"

    const-string v4, "string"

    invoke-virtual {v2, v3, v5, v1}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

    move-result v0

    .line 54
    if-nez v0, :cond_1

    const-string v3, ""

    move-object v3, v9

    :goto_1
    iput-object v3, p0, Lrexsee/core/application/Resource;->home:Ljava/lang/String;

    .line 56
    const-string v3, "app_author"

    const-string v4, "string"

    invoke-virtual {v2, v3, v5, v1}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

    move-result v0

    .line 57
    if-nez v0, :cond_2

    const-string v3, ""

    move-object v3, v9

    :goto_2
    iput-object v3, p0, Lrexsee/core/application/Resource;->author:Ljava/lang/String;

    .line 59
    const-string v3, "app_email"

    const-string v4, "string"

    invoke-virtual {v2, v3, v5, v1}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

    move-result v0

    .line 60
    if-nez v0, :cond_3

    const-string v3, ""

    move-object v3, v9

    :goto_3
    iput-object v3, p0, Lrexsee/core/application/Resource;->email:Ljava/lang/String;

    .line 62
    const-string v3, "allow_domains"

    const-string v4, "array"

    invoke-virtual {v2, v3, v4, v1}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

    move-result v0

    .line 63
    if-nez v0, :cond_4

    const/4 v3, 0x0

    :goto_4
    iput-object v3, p0, Lrexsee/core/application/Resource;->domainWhiteList:[Ljava/lang/String;

    .line 65
    const-string v3, "cover"

    const-string v4, "drawable"

    invoke-virtual {v2, v3, v4, v1}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

    move-result v0

    .line 66
    if-nez v0, :cond_5

    const/4 v3, 0x0

    :goto_5
    iput-object v3, p0, Lrexsee/core/application/Resource;->cover:Landroid/graphics/drawable/Drawable;

    .line 68
    const-string v3, "screenOrientation"

    const-string v4, "string"

    invoke-virtual {v2, v3, v5, v1}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

    move-result v0

    .line 69
    if-nez v0, :cond_6

    const-string v3, "auto"

    :goto_6
    iput-object v3, p0, Lrexsee/core/application/Resource;->screenOrientation:Ljava/lang/String;

    .line 71
    const-string v3, "titleBar"

    const-string v4, "string"

    invoke-virtual {v2, v3, v5, v1}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

    move-result v0

    .line 72
    if-nez v0, :cond_7

    move v3, v6

    :goto_7
    iput-boolean v3, p0, Lrexsee/core/application/Resource;->titleBar:Z

    .line 73
    const-string v3, "statusBar"

    const-string v4, "string"

    invoke-virtual {v2, v3, v5, v1}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

    move-result v0

    .line 74
    if-nez v0, :cond_9

    move v3, v6

    :goto_8
    iput-boolean v3, p0, Lrexsee/core/application/Resource;->statusBar:Z

    .line 75
    const-string v3, "fullScreen"

    const-string v4, "string"

    invoke-virtual {v2, v3, v5, v1}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

    move-result v0

    .line 76
    if-nez v0, :cond_b

    move v3, v7

    :goto_9
    iput-boolean v3, p0, Lrexsee/core/application/Resource;->fullScreen:Z

    .line 77
    const-string v3, "progressCover"

    const-string v4, "string"

    invoke-virtual {v2, v3, v5, v1}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

    move-result v0

    .line 78
    if-nez v0, :cond_d

    move v3, v6

    :goto_a
    iput-boolean v3, p0, Lrexsee/core/application/Resource;->progressCover:Z

    .line 79
    const-string v3, "browserProgressDialog"

    const-string v4, "string"

    invoke-virtual {v2, v3, v5, v1}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

    move-result v0

    .line 80
    if-nez v0, :cond_f

    move v3, v6

    :goto_b
    iput-boolean v3, p0, Lrexsee/core/application/Resource;->browserProgressDialog:Z

    .line 81
    const-string v3, "browserBackgroundColor"

    const-string v4, "string"

    invoke-virtual {v2, v3, v5, v1}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

    move-result v0

    .line 82
    if-nez v0, :cond_11

    const-string v3, "#FFFFFF"

    :goto_c
    iput-object v3, p0, Lrexsee/core/application/Resource;->browserBackgroundColor:Ljava/lang/String;

    .line 83
    return-void

    .line 51
    :cond_0
    invoke-virtual {v2, v0}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v3

    goto/16 :goto_0

    .line 54
    :cond_1
    invoke-virtual {v2, v0}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v3

    goto/16 :goto_1

    .line 57
    :cond_2
    invoke-virtual {v2, v0}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v3

    goto/16 :goto_2

    .line 60
    :cond_3
    invoke-virtual {v2, v0}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v3

    goto/16 :goto_3

    .line 63
    :cond_4
    invoke-virtual {v2, v0}, Landroid/content/res/Resources;->getStringArray(I)[Ljava/lang/String;

    move-result-object v3

    goto/16 :goto_4

    .line 66
    :cond_5
    invoke-virtual {v2, v0}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v3

    goto/16 :goto_5

    .line 69
    :cond_6
    invoke-virtual {v2, v0}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v3

    goto :goto_6

    .line 72
    :cond_7
    invoke-virtual {v2, v0}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v3

    const-string v4, "false"

    invoke-virtual {v3, v8}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_8

    move v3, v7

    goto :goto_7

    :cond_8
    move v3, v6

    goto :goto_7

    .line 74
    :cond_9
    invoke-virtual {v2, v0}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v3

    const-string v4, "false"

    invoke-virtual {v3, v8}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_a

    move v3, v7

    goto :goto_8

    :cond_a
    move v3, v6

    goto :goto_8

    .line 76
    :cond_b
    invoke-virtual {v2, v0}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v3

    const-string v4, "true"

    invoke-virtual {v3, v4}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_c

    move v3, v6

    goto/16 :goto_9

    :cond_c
    move v3, v7

    goto/16 :goto_9

    .line 78
    :cond_d
    invoke-virtual {v2, v0}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v3

    const-string v4, "false"

    invoke-virtual {v3, v8}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_e

    move v3, v7

    goto/16 :goto_a

    :cond_e
    move v3, v6

    goto/16 :goto_a

    .line 80
    :cond_f
    invoke-virtual {v2, v0}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v3

    const-string v4, "false"

    invoke-virtual {v3, v8}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_10

    move v3, v7

    goto/16 :goto_b

    :cond_10
    move v3, v6

    goto/16 :goto_b

    .line 82
    :cond_11
    invoke-virtual {v2, v0}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v3

    goto/16 :goto_c
.end method

.method public static getIconId(Landroid/content/Context;)I
    .locals 4
    .param p0, "context"    # Landroid/content/Context;

    .prologue
    .line 86
    invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    const-string v1, "icon"

    const-string v2, "drawable"

    invoke-virtual {p0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v0, v1, v2, v3}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

    move-result v0

    return v0
.end method

.method public static isEnabled(Landroid/content/Context;Ljava/lang/String;Z)Z
    .locals 5
    .param p0, "context"    # Landroid/content/Context;
    .param p1, "name"    # Ljava/lang/String;
    .param p2, "defaultValue"    # Z

    .prologue
    .line 90
    invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    .line 91
    .local v2, "r":Landroid/content/res/Resources;
    invoke-virtual {p0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v1

    .line 92
    .local v1, "packageName":Ljava/lang/String;
    const-string v3, "string"

    invoke-virtual {v2, p1, v3, v1}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

    move-result v0

    .line 93
    .local v0, "id":I
    if-nez v0, :cond_0

    move v3, p2

    .line 94
    :goto_0
    return v3

    :cond_0
    invoke-virtual {v2, v0}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v3

    const-string v4, "true"

    invoke-virtual {v3, v4}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v3

    goto :goto_0
.end method
